<template>
   <div class="top">
      <div class="search-box">
        <span class="search-txt"> 
          <slot>商品类型搜索：</slot><!-- 插槽 -->
        </span>
        <div class="search">
          <el-input
            v-model="input"
            placeholder="请输入"
          ></el-input>
        </div>
        <el-button type="primary" @click='search'><i class="el-icon-zoom-in"></i>查询</el-button>
      </div>
      <!-- <div class="date-box" date>
        <span class="search-txt"> 
          选择日期：
        </span>
         <el-date-picker
      v-model="value1"
      type="daterange"
      range-separator="至"
      start-placeholder="开始日期"
      end-placeholder="结束日期">
    </el-date-picker>

      </div> -->
    </div>
</template>

<script>
export default {
  data(){
    return{
       input:'',
       value1:''
    }
  },
  methods:{
    search(){
      this.$emit('search',this.input)
    }
  }

}
</script>

<style lang='less' scoped>
.top {
    height: 80px;
    margin-bottom: 20px;
    background-color: #fff;
  }
   .search-box {
    margin-left: 10px;
    display: flex;
    justify-content: space-between;
    width: 450px;
    height: 80px;
    align-items: center;
  }
  .search-txt {
    font-style: 14px;
  }
   .search {
    width: 210px;
    height: 56px;
    margin-top: 15px;
  }
  .el-icon-zoom-in {
    margin-right: 10px;
    font-size: 19px;
    margin-top: 1px;
  }

</style>